import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/index.js' // 导入路由
import * as ElementPlusIconsVue from '@element-plus/icons-vue'//导入icon图标
import QrcodeVue from 'qrcode.vue';//二维码库

const app = createApp(App)


// 注册 Element Plus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 使用路由
app.use(router)

// 使用 Element Plus
app.use(ElementPlus)

//使用二维码库
app.component('QrcodeVue', QrcodeVue)

// 挂载应用
app.mount('#app')